//
//  Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//

#import "BaseModel.h"
#import "StickerInfo.h"

NS_ASSUME_NONNULL_BEGIN

@class SDSAnyReadTransaction;

@interface InstalledSticker : BaseModel

@property (nonatomic, readonly) StickerInfo *info;
@property (nonatomic, readonly, nullable) NSString *emojiString;
@property (nonatomic, readonly, nullable) NSString *contentType;

// Convenience accessors.
@property (nonatomic, readonly) NSData *packId;
@property (nonatomic, readonly) NSData *packKey;
@property (nonatomic, readonly) UInt32 stickerId;

+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithUniqueId:(NSString *)uniqueId NS_UNAVAILABLE;
- (instancetype)initWithGrdbId:(int64_t)grdbId uniqueId:(NSString *)uniqueId NS_UNAVAILABLE;

- (instancetype)initWithInfo:(StickerInfo *)info
                 contentType:(nullable NSString *)contentType
                 emojiString:(nullable NSString *)emojiString NS_DESIGNATED_INITIALIZER;

// --- CODE GENERATION MARKER

// This snippet is generated by /Scripts/sds_codegen/sds_generate.py. Do not manually edit it, instead run `sds_codegen.sh`.

// clang-format off

- (instancetype)initWithGrdbId:(int64_t)grdbId
                      uniqueId:(NSString *)uniqueId
                     contentType:(nullable NSString *)contentType
                     emojiString:(nullable NSString *)emojiString
                            info:(StickerInfo *)info
NS_DESIGNATED_INITIALIZER NS_SWIFT_NAME(init(grdbId:uniqueId:contentType:emojiString:info:));

// clang-format on

// --- CODE GENERATION MARKER

+ (NSString *)uniqueIdForStickerInfo:(StickerInfo *)info;

@end

NS_ASSUME_NONNULL_END
